package com.ext.portlet.city.service.impl;

import java.rmi.RemoteException;

import com.ext.portlet.city.model.City;
import com.ext.portlet.city.service.CityServiceUtil;
import com.ext.portlet.city.service.base.CityLocalServiceBaseImpl;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;
import com.liferay.portal.model.Country;
import com.liferay.portal.model.Region;
import com.liferay.portal.service.CountryServiceUtil;
import com.liferay.portal.service.RegionServiceUtil;


public class CityLocalServiceImpl extends CityLocalServiceBaseImpl {
			
		public  String countryName(long countryId)
			throws PortalException, SystemException{
		
			String name = null;
			Country country = CountryServiceUtil.getCountry(countryId);
			name = country.getName();
		
		return name;
		}
		
		public  String stateName(Long regionId)
			throws PortalException, SystemException, RemoteException{
			
			String name = null;
			Region region = RegionServiceUtil.getRegion(regionId);
			name = region.getName();
		
			return name;
		}
		
		public  String cityName(long cityId)
			throws PortalException, SystemException{
			
			String name = null;
			City city = CityServiceUtil.getCity(cityId);
			name = city.getName();
		
			return name;
		}	
	
	
}
